﻿<Window x:Class="BOL.Apps.GeneNetworkBrowser.Windows.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock"
        xmlns:control="clr-namespace:BOL.Apps.GeneNetworkBrowser.Controls"
        xmlns:vm="clr-namespace:BOL.Apps.GeneNetworkBrowser.ViewModels"
        xmlns:converters="clr-namespace:BOL.Apps.GeneNetworkBrowser.Converters"
        Name="_mainWindow"
        Title="{Binding Title}"
        WindowState="Maximized"
        ResizeMode="CanResizeWithGrip"
        Icon="/Images/GeneRelationBrowser.ico"
        >
    <Window.Resources>
        <!-- Styles -->
        <Style x:Key="VisibleWhenFileIsOpen" TargetType="MenuItem">
            <Style.Triggers>
                <DataTrigger Binding="{Binding IsFileOpen}" Value="False">
                    <Setter Property="Visibility" Value="Hidden"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="{x:Static ToolBar.SeparatorStyleKey}" TargetType="Separator">
            <Setter Property="Background" Value="#FF9CAAC1"/>
            <Setter Property="Width" Value="1"/>
        </Style>

        <!-- Converters -->
        <converters:DockableContentStateConverter x:Key="DockableContentStateConverter" />

        <!-- Commands -->
        <RoutedUICommand x:Key="Up" Text="Up" />
        <RoutedUICommand x:Key="Down" Text="Down" />
        <RoutedUICommand x:Key="Right" Text="Right" />
        <RoutedUICommand x:Key="Left" Text="Left" />
        <RoutedUICommand x:Key="ZoomToFill" Text="Zoom To Fill" />
        <RoutedUICommand x:Key="FullScreen" Text="Full Screen" />

        <!-- DataTemplates -->

        <!-- ProjectPane:DataTemplate -->
        <DataTemplate DataType="{x:Type vm:ProjectPaneViewModel}">
            <!--control:AvalonDockHost.IsPaneVisible="{Binding IsVisible}">-->
            <control:ProjectPane x:Name="ProjectPane" />
        </DataTemplate>
        <DataTemplate DataType="{x:Type vm:PropertyPaneViewModel}">
            <control:PropertyPane x:Name="PropertyPane" />
        </DataTemplate>
        <DataTemplate DataType="{x:Type vm:AnnotationPaneViewModel}">
            <control:AnnotationPane x:Name="AnnotationPane" />
        </DataTemplate>
        <DataTemplate DataType="{x:Type vm:OutputPaneViewModel}">
            <control:OutputPane x:Name="OutputPane"/>
        </DataTemplate>
        <DataTemplate DataType="{x:Type vm:FilterPaneViewModel}">
            <control:FilterPane x:Name="FilterPane" />
        </DataTemplate>
        <DataTemplate DataType="{x:Type vm:AnalysisPaneViewModel}">
            <control:AnalysisPane x:Name="AnalysisPane" />
        </DataTemplate>
        <DataTemplate DataType="{x:Type vm:StartDocumentViewModel}">
            <control:StartDocument />
        </DataTemplate>
        <DataTemplate DataType="{x:Type vm:NetworkDocumentViewModel}">
            <control:NetworkDocument />
        </DataTemplate>
        <DataTemplate DataType="{x:Type vm:SubNetworksDocumentViewModel}">
            <control:SubNetworksDocument />
        </DataTemplate>
        <DataTemplate DataType="{x:Type vm:SpreadsheetDocumentViewModel}">
            <control:SpreadsheetDocument />
        </DataTemplate>
        
    </Window.Resources>

    <Window.CommandBindings>
        <CommandBinding Command="New" CanExecute="CommandCanExecute" Executed="NewCommandExecuted" />
        <CommandBinding Command="Open" CanExecute="CommandCanExecute" Executed="OpenCommandExecuted" />
        <CommandBinding Command="Save" CanExecute="CommandCanExecute" Executed="SaveCommandExecuted" />
        <CommandBinding Command="SaveAs" CanExecute="CommandCanExecute" Executed="SaveAsCommandExecuted" />
        <CommandBinding Command="Print" CanExecute="CommandCanExecute" Executed="PrintCommandExecuted" />
        <CommandBinding Command="PrintPreview" CanExecute="CommandCanExecute" Executed="PrintPreviewCommandExecuted" />
        <CommandBinding Command="Properties" CanExecute="CommandCanExecute" Executed="PropertiesCommandExecuted" />
        <CommandBinding Command="Close" CanExecute="CommandCanExecute" Executed="CloseCommandExecuted" />
        <CommandBinding Command="Undo" CanExecute="CommandCanExecute" Executed="UndoCommandExecuted" />
        <CommandBinding Command="Redo" CanExecute="CommandCanExecute" Executed="RedoCommandExecuted" />
        <CommandBinding Command="Copy" CanExecute="CommandCanExecute" Executed="CopyCommandExecuted" />
        <CommandBinding Command="Cut" CanExecute="CommandCanExecute" Executed="CutCommandExecuted" />
        <CommandBinding Command="Paste" CanExecute="CommandCanExecute" Executed="PasteCommandExecuted" />
        <CommandBinding Command="Delete" CanExecute="CommandCanExecute" Executed="DeleteCommandExecuted" />
        <CommandBinding Command="Find" CanExecute="CommandCanExecute" Executed="FindCommandExecuted" />
        <CommandBinding Command="IncreaseZoom" CanExecute="CommandCanExecute" Executed="IncreaseZoomCommandExecuted" />
        <CommandBinding Command="DecreaseZoom" CanExecute="CommandCanExecute" Executed="DecreaseZoomCommandExecuted" />
        <CommandBinding Command="{StaticResource ZoomToFill}" CanExecute="CommandCanExecute" Executed="ZoomToFillCommandExecuted" />
        <CommandBinding Command="{StaticResource FullScreen}" CanExecute="CommandCanExecute" Executed="FullScreenCommandExecuted" />
        <CommandBinding Command="SelectAll" CanExecute="CommandCanExecute" Executed="SelectAllCommandExecuted" />
        <CommandBinding Command="Help" CanExecute="CommandCanExecute" Executed="HelpCommandExecuted" />
        <CommandBinding Command="{StaticResource Up}" CanExecute="CommandCanExecute" Executed="UpCommandExecuted" />
        <CommandBinding Command="{StaticResource Down}" CanExecute="CommandCanExecute" Executed="DownCommandExecuted" />
        <CommandBinding Command="{StaticResource Right}" CanExecute="CommandCanExecute" Executed="RightCommandExecuted" />
        <CommandBinding Command="{StaticResource Left}" CanExecute="CommandCanExecute" Executed="LeftCommandExecuted" />
        <CommandBinding Command="Search" CanExecute="CommandCanExecute" Executed="SearchCommandExecute" />
    </Window.CommandBindings>
    <Window.InputBindings>
        <KeyBinding Command="{StaticResource Up}" Key="Up" />
        <KeyBinding Command="{StaticResource Down}" Key="Down" />
        <KeyBinding Command="{StaticResource Right}" Key="Right" />
        <KeyBinding Command="{StaticResource Left}" Key="Left" />
        <KeyBinding Command="Find" Key="F" Modifiers="Control" />
        <KeyBinding Command="IncreaseZoom" Key="OemPlus" Modifiers="Control" />
        <KeyBinding Command="DecreaseZoom" Key="OemMinus" Modifiers="Control" />
        <KeyBinding Command="{StaticResource ZoomToFill}" Key="D0" Modifiers="Control" />
        <KeyBinding Command="{StaticResource FullScreen}" Key="F11" />
    </Window.InputBindings>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="24"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="24"/>
        </Grid.RowDefinitions>

        <Menu Grid.Row="0" Background="#FFBCC7D8">
            <MenuItem Header="_File">
                <MenuItem Header="New..." Command="New" >
                    <MenuItem.Icon>
                        <Image Source="/Images/New.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Open..." Command="Open">
                    <MenuItem.Icon>
                        <Image Source="/Images/Open.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Save" Command="Save">
                    <MenuItem.Icon>
                        <Image Source="/Images/Save.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Save As..." Command="SaveAs" />
                <MenuItem Header="Save All" IsEnabled="False">
                    <MenuItem.Icon>
                        <Image Source="/Images/SaveAll.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <Separator />
                <MenuItem Header="Import">
                    <MenuItem Header="_Text Files..." Click="ImportText" />
                    <MenuItem Header="E_xcel Files..." Click="ImportExcel" />
                </MenuItem>
                <MenuItem Header="Export">
                    <MenuItem Header="Bitmap" Click="ExportCanvasToImage">
                        <MenuItem.Icon>
                            <Image Source="/Images/Capture.png" Width="16" Height="16" />
                        </MenuItem.Icon>
                    </MenuItem>
                </MenuItem>
                <Separator />
                <MenuItem Header="Print..." Command="Print">
                    <MenuItem.Icon>
                        <Image Source="/Images/Print.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Print Preview..." Command="PrintPreview">
                    <MenuItem.Icon>
                        <Image Source="/Images/Preview.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <Separator />
                <MenuItem Header="E_xit" Command="Close" />
            </MenuItem>
            <MenuItem Header="_Edit" >
                <MenuItem Header="Undo" Command="Undo">
                    <MenuItem.Icon>
                        <Image Source="/Images/Undo.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Redo" Command="Redo">
                    <MenuItem.Icon>
                        <Image Source="/Images/Redo.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <Separator />
                <MenuItem Header="Copy" Command="Copy">
                    <MenuItem.Icon>
                        <Image Source="/Images/Copy.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Cut" Command="Cut">
                    <MenuItem.Icon>
                        <Image Source="/Images/Cut.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Paste" Command="Paste" IsEnabled="False">
                    <MenuItem.Icon>
                        <Image Source="/Images/Paste.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Delete" Command="Delete" IsEnabled="False">
                    <MenuItem.Icon>
                        <Image Source="/Images/Delete.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <Separator />
                <MenuItem Header="Select All" Command="SelectAll" IsEnabled="False" />
                <Separator />
                <MenuItem Header="Find..." Command="Find">
                    <MenuItem.Icon>
                        <Image Source="/Images/Find.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <Separator />
                <MenuItem Header="Preference" Command="Properties" />
            </MenuItem>
            <MenuItem Header="_View">
                <MenuItem Header="Project Pane" Click="MenuItemView_ProjectPane_Click">
                    <MenuItem.Icon>
                        <Image Source="/Images/ProjectPane.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Property Pane" Click="MenuItemView_PropertyPane_Click">
                    <MenuItem.Icon>
                        <Image Source="/Images/PropertyPane.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Annotation Pane" Click="MenuItemView_AnnotationPane_Click">
                    <MenuItem.Icon>
                        <Image Source="/Images/AnnotationPane.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Output Pane" Click="MenuItemView_OutputPane_Click">
                    <MenuItem.Icon>
                        <Image Source="/Images/OutputPane.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Filter Pane" Click="MenuItemView_FilterPane_Click">
                    <MenuItem.Icon>
                        <Image Source="/Images/FilterPane.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Analysis" Click="MenuItemView_AnalysisPane_Click">
                    <!--<MenuItem.Icon>
                        <Image Source="/Images/Analysis.png" Width="16" Height="16" />
                    </MenuItem.Icon>-->
                </MenuItem>
                <Separator />
                <MenuItem Header="Zoom In" Command="IncreaseZoom" InputGestureText="Ctrl++" />
                <MenuItem Header="Zoom Out" Command="DecreaseZoom" InputGestureText="Ctrl+-" />
                <MenuItem Header="Zoom To Fill" Command="{StaticResource ZoomToFill}" InputGestureText="Ctrl+0">
                    <MenuItem.Icon>
                        <Image Source="/Images/FitScreen.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <Separator />
                <MenuItem Header="Full Screen" Command="{StaticResource FullScreen}" InputGestureText="F11">
                    <MenuItem.Icon>
                        <Image Source="/Images/FullScreen.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
            </MenuItem>
            <MenuItem Header="_Analysis">
                <MenuItem Header="Add Custom Values To">
                    <MenuItem Header="Network" />
                    <MenuItem Header="Genes" Click="MenuItemAnalysis_AddCustomValuesToGenes_Click" />
                </MenuItem>
                <MenuItem Header="Compile">
                    <MenuItem Header="Human Gene Relation Network" Click="MenuItemAnalysis_Compile_HGR_Click" />
                    <MenuItem Header="CN-AML 24 Network" Click="MenuItemAnalysis_Compile_A24R_Click" />
                </MenuItem>
                <MenuItem Header="SubNetwork" Click="MenuItemAnalysis_SubNetwork_Click" />
                <MenuItem Header="Classification" />
                <MenuItem Header="Cox Regression" Click="MenuItemAnalysis_CoxRegression_Click"/>
            </MenuItem>
            <MenuItem Header="_Window">
                <MenuItem Header="Float" IsEnabled="{Binding ElementName=_dockingManager, Path=ActiveDockableContent.State, Converter={StaticResource DockableContentStateConverter}, ConverterParameter=Float}" />
                <MenuItem Header="Dock" IsEnabled="{Binding ElementName=_dockingManager, Path=ActiveDockableContent.State, Converter={StaticResource DockableContentStateConverter}, ConverterParameter=Dock}" />
                <MenuItem Header="Dock as Tabbed Document" IsEnabled="{Binding ElementName=_dockingManager, Path=ActiveDockableContent.State, Converter={StaticResource DockableContentStateConverter}, ConverterParameter=Document}" />
                <MenuItem Header="Auto Hide" IsEnabled="{Binding ElementName=_dockingManager, Path=ActiveDockableContent.State, Converter={StaticResource DockableContentStateConverter}, ConverterParameter=AutoHide}" />
                <MenuItem Header="Hide" IsEnabled="{Binding ElementName=_dockingManager, Path=ActiveDockableContent.State, Converter={StaticResource DockableContentStateConverter}, ConverterParameter=Hide}" />
                <Separator />
                <MenuItem Header="Auto Hide All" Click="MenuItemWindow_AutoHideAll_Click" />
                <MenuItem Header="New Horizontal Tab Group" Click="MenuItemWindow_NewHorizontalTabGroup_Click" IsEnabled="{Binding ElementName=_documentPane, Path=ContainsActiveDocument}">
                    <MenuItem.Icon>
                        <Image Source="/Images/Window_Horizontal.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="New Vertical Tab Group" Click="MenuItemWindow_NewVerticalTabGroup_Click" IsEnabled="{Binding ElementName=_documentPane, Path=ContainsActiveDocument}">
                    <MenuItem.Icon>
                        <Image Source="/Images/Window_Vertical.png" Width="16" Height="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Close All Documents" Click="MenuItemWindow_CloseAllDocuments_Click" />
                <MenuItem Header="Reset Window Layout" Click="RestoreLayout" />
                <Separator />
                <MenuItem Header="Opened Documents" ItemsSource="{Binding Documents}">
                    <MenuItem.ItemContainerStyle>
                        <Style>
                            <Setter Property="MenuItem.Header" Value="{Binding Name}"/>
                            <Setter Property="MenuItem.Command" Value="{Binding OpenCommand}"/>
                        </Style>
                    </MenuItem.ItemContainerStyle>
                </MenuItem>
            </MenuItem>
            <MenuItem Header="_Help">
                <MenuItem Header="Help" Command="Help" />
                <MenuItem Header="About" StaysOpenOnClick="True" Click="MenuItemHelp_About_Click" />
            </MenuItem>
        </Menu>

        <ToolBarTray Grid.Row="1" Background="#FF9CAAC1">
            <ToolBar Background="#FFBCC7D8">
                <Button Name="_tbbMainNew" Command="New">
                    <Image Source="/Images/New.png" Width="16" Height="16" />
                </Button>
                <Button Name="_tbbMainAdd">
                    <!--<Image Source="/Images/Add.png" Width="16" Height="16" />-->
                </Button>
                <Button Name="_tbbMainOpen" Command="Open">
                    <Image Source="/Images/Open.png" Width="16" Height="16" />
                </Button>
                <Button Name="_tbbMainSave" Command="Save">
                    <Image Source="/Images/Save.png" Width="16" Height="16" />
                </Button>
                <Button Name="_tbbMainSaveAll" IsEnabled="False">
                    <Image Source="/Images/SaveAll.png" Width="16" Height="16" />
                </Button>
                <Button Name="_tbbMainPrint" Command="Print">
                    <Image Source="/Images/Print.png" Width="16" Height="16" />
                </Button>
                <Button Name="_tbbMainPreview" Command="PrintPreview">
                    <Image Source="/Images/Preview.png" Width="16" Height="16" />
                </Button>
                <Separator />
                <Button Name="_tbbMainCloseAll" Click="MenuItemWindow_CloseAllDocuments_Click">
                    <Image Source="/Images/CloseAll.png" Width="16" Height="16" />
                </Button>
                <Separator />
                <Button Name="_tbbMainEditCut" Command="Cut" IsEnabled="False">
                    <Image Source="/Images/Cut.png" Width="16" Height="16" />
                </Button>
                <Button Name="_tbbMainEditCopy" Command="Copy" IsEnabled="False">
                    <Image Source="/Images/Copy.png" Width="16" Height="16" />
                </Button>
                <Button Name="_tbbMainEditPaste" Command="Paste" IsEnabled="False">
                    <Image Source="/Images/Paste.png" Width="16" Height="16" />
                </Button>
                <Separator />
                <ComboBox Name="_cbTargetType" Width="90" Margin="0,0,3,0">
                    <ComboBoxItem ToolTip="CDH24;EBI2;GPR123">Gene Symbol</ComboBoxItem>
                    <ComboBoxItem IsSelected="True" ToolTip="64403;1880;84435">ENTREZ ID</ComboBoxItem>
                </ComboBox>
                <!--<AdornerDecorator>-->
                <TextBox Name="_tbInputGenes" Width="150" Margin="0,0,3,0" KeyDown="_tbInputGenes_KeyDown">
                    <!--<control:WatermarkService.Watermark>
                            <TextBlock VerticalAlignment="Center" FontStyle="Italic" Text="{Binding ElementName=_cbTargetType, Path=SelectedItem.ToolTip}" />
                        </control:WatermarkService.Watermark>-->
                </TextBox>
                <!--</AdornerDecorator>-->
                <TextBlock VerticalAlignment="Center" Text="Database" Margin="0,0,3,0" />
                <ComboBox Name="_cbDatabase" Width="120">
                    <ComboBoxItem>
                        <CheckBox Name="_cbDatabaseGXPCC" IsChecked="False">GX: PCC</CheckBox>
                    </ComboBoxItem>
                    <ComboBoxItem>
                        <CheckBox Name="_cbDatabaseGXMI" IsChecked="False">GX: MI</CheckBox>
                    </ComboBoxItem>
                    <ComboBoxItem>
                        <CheckBox Name="_cbDatabaseLitNLP" IsChecked="True">Lit: NLP</CheckBox>
                    </ComboBoxItem>
                    <ComboBoxItem>
                        <CheckBox Name="_cbDatabaseLitNCBI" IsChecked="True">Lit: NCBI</CheckBox>
                    </ComboBoxItem>
                    <ComboBoxItem>
                        <CheckBox Name="_cbDatabaseLitComentioned" IsChecked="False">Lit: Comentioned</CheckBox>
                    </ComboBoxItem>
                    <ComboBoxItem>
                        <CheckBox Name="_cbDatabasePPIHPRD" IsChecked="True">PPI: HPRD</CheckBox>
                    </ComboBoxItem>
                    <ComboBoxItem>
                        <CheckBox Name="_cbDatabasePPIIntAct" IsChecked="True">PPI: IntAct</CheckBox>
                    </ComboBoxItem>
                    <ComboBoxItem>
                        <CheckBox Name="_cbDatabasePPIMIPS" IsChecked="True">PPI: MIPS</CheckBox>
                    </ComboBoxItem>
                    <ComboBoxItem>
                        <CheckBox Name="_cbDatabasePPIMINT" IsChecked="True">PPI: MINT</CheckBox>
                    </ComboBoxItem>
                    <ComboBoxItem>
                        <CheckBox Name="_cbDatabasePPIDIP" IsChecked="True">PPI: DIP</CheckBox>
                    </ComboBoxItem>
                    <ComboBoxItem>
                        <CheckBox Name="_cbDatabasePPIREACTOME" IsChecked="True">PPI: REACTOME</CheckBox>
                    </ComboBoxItem>
                    <ComboBoxItem>
                        <CheckBox Name="_cbDatabasePPIKEGG" IsChecked="True">PPI: KEGG</CheckBox>
                    </ComboBoxItem>
                    <ComboBoxItem>
                        <CheckBox Name="_cbDatabaseTFPANTHER" IsChecked="True">TF: PANTHER</CheckBox>
                    </ComboBoxItem>
                    <ComboBoxItem>
                        <CheckBox Name="_cbDatabaseTFJASPAR" IsChecked="True">TF: JASPAR</CheckBox>
                    </ComboBoxItem>
                    <ComboBoxItem>
                        <CheckBox Name="_cbDatabaseTFKEGG" IsChecked="True">TF: KEGG</CheckBox>
                    </ComboBoxItem>
                    <ComboBoxItem>
                        <CheckBox Name="_cbDatabaseTFPAP" IsChecked="False">TF: PAP</CheckBox>
                    </ComboBoxItem>
                </ComboBox>
                <Button Name="_tbbSearch" Command="Search">
                    <Image Source="/Images/Search.png" Width="16" Height="16" />
                </Button>
                <Separator />
                <Button Name="_tbbMainViewProjectPane" Click="MenuItemView_ProjectPane_Click">
                    <Image Source="/Images/ProjectPane.png" Width="16" Height="16" />
                </Button>
                <Button Name="_tbbMainViewPropertyPane" Click="MenuItemView_PropertyPane_Click">
                    <Image Source="/Images/PropertyPane.png" Width="16" Height="16" />
                </Button>
                <Button Name="_tbbMainViewAnnotationPane" Click="MenuItemView_AnnotationPane_Click">
                    <Image Source="/Images/AnnotationPane.png" Width="16" Height="16" />
                </Button>
                <Button Name="_tbbMainViewOutputPane" Click="MenuItemView_OutputPane_Click">
                    <Image Source="/Images/OutputPane.png" Width="16" Height="16" />
                </Button>
                <Button Name="_tbbMainViewFilterPane" Click="MenuItemView_FilterPane_Click">
                    <Image Source="/Images/FilterPane.png" Width="16" Height="16" />
                </Button>
                <!--<Button Name="_tbbMainViewAnalysisPane" Click="MenuItemView_AnalysisPane_Click">
                    <Image Source="/Images/AnalysisPane.png" Width="16" Height="16" />
                </Button>-->
            </ToolBar>
        </ToolBarTray>

        <control:AvalonDockHost 
            x:Name="_avalonDockHost" 
            Panes="{Binding Panes}"
            Documents="{Binding Documents}"
            ActiveDocument="{Binding ActiveDocument}"
            ActivePane="{Binding ActivePane}"
            AvalonDockLoaded="AvalonDockHostLoaded"
            DocumentClosing="AvalonDockHostDocumentClosing"
            Grid.Row="2" />

        <StatusBar Grid.Row="3" Background="#FF344768" Foreground="White">
            <StatusBar.Resources>
                <Style TargetType="TextBlock" x:Key="StatusBarTextBlock">
                    <Setter Property="TextWrapping" Value="NoWrap" />
                    <Setter Property="TextTrimming" Value="CharacterEllipsis" />
                </Style>
            </StatusBar.Resources>

            <StatusBar.ItemsPanel>
                <ItemsPanelTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="120" />
                            <ColumnDefinition Width="70" />
                            <ColumnDefinition Width="70" />
                        </Grid.ColumnDefinitions>
                    </Grid>
                </ItemsPanelTemplate>
            </StatusBar.ItemsPanel>

            <StatusBarItem>
                <TextBlock Style="{StaticResource StatusBarTextBlock}" Text="{Binding StatusBarMessage}"/>
            </StatusBarItem>
            <StatusBarItem Grid.Column="1" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <ProgressBar Value="{Binding CurrentProgress, Mode=OneWay}" Visibility="{Binding ProgressBarVisibility}" />
            </StatusBarItem>
            <StatusBarItem Grid.Column="2" HorizontalContentAlignment="Stretch">
                <StackPanel Orientation="Horizontal">
                    <TextBlock Padding="0,0,5,0">V:</TextBlock>
                    <TextBlock Style="{StaticResource StatusBarTextBlock}" Text="{Binding VertexCount}" />
                </StackPanel>
            </StatusBarItem>
            <StatusBarItem Grid.Column="3" HorizontalContentAlignment="Stretch">
                <StackPanel Orientation="Horizontal">
                    <TextBlock Padding="0,0,5,0">E:</TextBlock>
                    <TextBlock Style="{StaticResource StatusBarTextBlock}" Text="{Binding EdgeCount}"/>
                </StackPanel>
            </StatusBarItem>
        </StatusBar>
    </Grid>
</Window>
